<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
	  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
      py:extends="'master.kid'">
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
    <title>用户管理 - TGSVN</title>
  </head>
  <body>
    <a href="adduser">用户新增</a>
    <table>
      <tr>
	<th>用户名称</th>
	<th>用户邮箱</th>
	<th>创建时间</th>
	<th>操作</th>
      </tr>
      <tr py:for="user in users" 
	  py:attrs="class=(users.index(user) % 2 == 0 and 'even' or 'odd')">
	<td py:content="user.display_name.encode('utf-8')">用户姓名</td>
	<td py:content="user.email_address">用户邮箱</td>
	<td py:content="user.created">创建时间</td>
	<td py:if="len(user.groups)==0">
	  <a href="${'user_%s'%user.user_name}">修改</a> | 
	  <a href="${tg.url('deluser',user_name=user.user_name)}" 
	     onclick="javascript:return confirm('是否确定删除用户 [ ${user.display_name} ] ?');">删除
	</a></td>
	<td py:if="len(user.groups)>0">管理员</td>
      </tr>
    </table>
  </body>
</html>
